(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

f(0) → s(0)
f(s(x)) → g(s(s(x)))
g(0) → s(0)
g(s(0)) → s(0)
g(s(s(x))) → f(x)

Rewrite Strategy: INNERMOST

(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)

Converted CpxTRS to CDT

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

f(0) → s(0)
f(s(z0)) → g(s(s(z0)))
g(0) → s(0)
g(s(0)) → s(0)
g(s(s(z0))) → f(z0)
Tuples:

F(s(z0)) → c1(G(s(s(z0))))
G(s(s(z0))) → c4(F(z0))
S tuples:

F(s(z0)) → c1(G(s(s(z0))))
G(s(s(z0))) → c4(F(z0))
K tuples:none
Defined Rule Symbols:

f, g

Defined Pair Symbols:

F, G

Compound Symbols:

c1, c4

(3) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

F(s(z0)) → c1(G(s(s(z0))))
We considered the (Usable) Rules:none
And the Tuples:

F(s(z0)) → c1(G(s(s(z0))))
G(s(s(z0))) → c4(F(z0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(F(x1)) = [2] + x1   
POL(G(x1)) = x1   
POL(c1(x1)) = x1   
POL(c4(x1)) = x1   
POL(s(x1)) = [1] + x1   

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

f(0) → s(0)
f(s(z0)) → g(s(s(z0)))
g(0) → s(0)
g(s(0)) → s(0)
g(s(s(z0))) → f(z0)
Tuples:

F(s(z0)) → c1(G(s(s(z0))))
G(s(s(z0))) → c4(F(z0))
S tuples:

G(s(s(z0))) → c4(F(z0))
K tuples:

F(s(z0)) → c1(G(s(s(z0))))
Defined Rule Symbols:

f, g

Defined Pair Symbols:

F, G

Compound Symbols:

c1, c4

(5) CdtKnowledgeProof (EQUIVALENT transformation)

The following tuples could be moved from S to K by knowledge propagation:

G(s(s(z0))) → c4(F(z0))
F(s(z0)) → c1(G(s(s(z0))))
Now S is empty

(6) BOUNDS(O(1), O(1))